<template>
  <view class="">
    <view class="y-flex-between">
      <view class="y-title y-margin-top">
        基本信息：
        <text class="y-detail">（用于身份核验，请务必正确填写）</text>
      </view>
    </view>
    <!-- <view class="y-form-input y-flex"> -->
      <!-- <view class="y-form-input">姓名：</view> -->
      <input data-label="姓名：" class=" y-form-input" maxlength="12" placeholder="请填写真实姓名" v-model="patientInfo.name" @input="bindInputChange" />
    <!-- </view> -->
    <picker @change="bindPickerChange" :value="patientInfo.sex" :range="sex">
      <input  data-label="性别：" class="y-form-input" maxlength="12" disabled placeholder="男/女" :value="sex[patientInfo.sex]" />
    </picker>
    <input
      data-label="年龄：" 
      class="y-form-input"
      maxlength="3"
      placeholder="请输入年龄"
      v-model="birthday"
      @input="bindBirthdayInputChange"
      type="number"
      @blur="correctAge"
    />
  </view>
</template>

<script src="../patient-info/model.js"></script>
<style lang="scss">
  .y-form-input{
    padding-left: 80rpx;
    position: relative;
    border-bottom: 1px solid #D2D2D2;
    border-radius: 0;
    margin: 50rpx 0;
    padding-bottom: 20rpx;
    &::before{
      content: attr(data-label);
      display: block;
      position: absolute;
      left: 0;
    }
  }
  
</style>
